package com.yulan.bankback.star;

import com.yulan.bankback.entity.model.admin.GeoIp;
import com.yulan.bankback.service.ip.IpService;
import net.ipip.ipdb.IPFormatException;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.io.IOException;

@SpringBootTest
public class testIp {

    @Autowired
    private IpService ipService;

    @Test
    public void testIp() throws IPFormatException, IOException {
        System.out.println(ipService.findCityByIp("124.240.11.177"));
   }

   private String buildIp(int a, int b, int c, int d){
       return a + "." + b +
               "." + c + "." + d;
    }

}
